CMAKE_MINIMUM_REQUIRED(VERSION 2.9)
PROJECT(DJFEC)

ENABLE_LANGUAGE(CUDA)

MESSAGE(STATUS "HOST OPERATION SYSTEM: ${CMAKE_SYSTEM}")

FIND_PACKAGE(CUDA)
FIND_PACKAGE(TIFF)

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STRICT_ANSI__")

# 设置生成库文件、可执行程序路径
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/build/bin)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/build/bin)

SET(CUDA_SEPARABLE_COMPILATION ON)
SET(CUDA_NVCC_FLAGS "-Wno-deprecated-gpu-targets")


IF(DEBUG_mode)
  ADD_DEFINITIONS(-DDEBUG)
ENDIF()


# =============================================

ADD_SUBDIRECTORY(src)

